﻿using System;

namespace OnePiece.Core.Extension
{
    public static  class  EnumerationExtension
    {
        public static string ToName(this Enum enumeration)
        {
            return Enum.GetName(enumeration.GetType(), enumeration);
        }

        public static int ToValue(this Enum enumeration)
        {
            return Convert.ToInt32(enumeration);
        }
        public static short ToShortValue(this Enum enumeration)
        {
            return Convert.ToInt16(enumeration);
        }

    }
}